@import "normalize";
@import "rouge-github";
@import "variables";
@import "blog";

@mixin large {
  @media screen and (min-width: #{$large-breakpoint}) {
    @content;
  }
}

@mixin medium {
  @media screen and (min-width: #{$medium-breakpoint}) and (max-width: #{$large-breakpoint}) {
    @content;
  }
}

@mixin small {
  @media screen and (max-width: #{$medium-breakpoint}) {
    @content;
  }
}

* {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: $body-text-color;
}

a {
  color: $body-link-color;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}


.gallery-category {
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: space-between;
    -ms-flex-pack: space-between;
    justify-content: space-between;
    -webkit-align-content: flex-start;
    -ms-flex-line-pack: start;
    align-content: flex-start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;

    &:after {
      content: "";
      flex: auto;
    }
}

#editor {
  background-color: #272822;
}

.gallery-item {
  -webkit-align-self: baseline;
  -ms-flex-item-align: baseline;
  align-self: baseline;
  margin: 1rem;
  width: 16rem;
  img {
    width: 16rem;
  }
}

.btn {
  display: inline-block;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.7);
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  border-style: solid;
  border-width: 1px;
  border-radius: 0.3rem;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;

  &:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
  }

  + .btn {
    margin-left: 1rem;
  }

  @include large {
    padding: 0.75rem 1rem;
  }

  @include medium {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
  }

  @include small {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;

    + .btn {
      margin-top: 1rem;
      margin-left: 0;
    }
  }
}

#previewtool {
  box-shadow: 0 0 10px 0px #00000080;
  #editor {
    height: 37.5em;
  }

  #preview {
    background: white;
    height: 37.5em;
    width: 100%;
  }
}

#editor_toolbar select {
  height: 1.4em;
  margin: .3em;
  font-size: .8em;
  border: 0;
  background: #2F3129;
  color: #8F908A;
}

#editor_toolbar option {
  font-size: .8em;
  background: #2F3129;
  color: #8F908A;
}

#editor_toolbar label {
  font-size: .8em;
  margin-left: 47px;
}

#editor_toolbar {
  text-align: left;
  width: 100%;
  background: #2F3129;
  color: #8F908A;
}

@media all and (min-width:60em) { 

  #editor_toolbar {
    width: 50%;
  }

  #previewtool {
    position: absolute;
    top: 21em;
    box-shadow: 0 0 10px 0px #00000080;
    left: 2em;
    right: 2em;

    #editor {
      width: 50%;
      height: 48em;
    }

    #preview-wrap {
      width: 50%;
      right: 0;
      top: 0;
      position: absolute;
      background: white;
      height: 37.5em;
      z-index: 10;
      overflow: hidden;

      .wrap {
        position: relative;
        height: 100%;
      }

      iframe {
        position: absolute;
        top: -5% * ( 1 / .9 );
        left: -5% * ( 1 / .9 );
        width: 100% * ( 1 / .9 );
        height: 37.5em * ( 1 / .9 );
        transform: scale(.9);
      }
    }
  }

  #previewtool ~ div {
    height: 33em;
  }

}

.page-header {
  color: $header-heading-color;
  box-shadow: inset 0 0 30px #0006;
  text-align: center;
  background-color: $header-bg-color;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.16'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v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m-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"), linear-gradient(120deg, $header-bg-color-secondary, $header-bg-color);

  @include large {
    padding: 2rem;
  }

  @include medium {
    padding: 2rem;
  }

  @include small {
    padding: 1rem;
  }
}

.project-name {
  margin-top: 0;
  margin-bottom: 0.1rem;

  @include large {
    font-size: 3.25rem;
  }

  @include medium {
    font-size: 2.25rem;
  }

  @include small {
    font-size: 1.75rem;
  }
}

.project-tagline {
  margin-bottom: 2rem;
  font-weight: normal;
  opacity: 0.7;

  @include large {
    font-size: 1.25rem;
  }

  @include medium {
    font-size: 1.15rem;
  }

  @include small {
    font-size: 1rem;
  }
}

.project-date {
  margin-bottom: 0rem;
  font-weight: normal;
  opacity: 0.7;
  font-style: italic;

  @include large {
    font-size: 1.0rem;
  }

  @include medium {
    font-size: 0.95rem;
  }

  @include small {
    font-size: 0.75rem;
  }
}

.main-content {
  word-wrap: break-word;

  :first-child {
    margin-top: 0;
  }

  @include large {
    max-width: 80rem;
    padding: 3rem 6rem;
    margin: 0 auto;
    font-size: 1.1rem;
  }

  @include medium {
    padding: 3rem 4rem;
    font-size: 1.1rem;
  }

  @include small {
    padding: 2rem 1rem;
    font-size: 1rem;
  }

  img {
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: normal;
    color: $section-headings-color;
  }

  p {
    margin-bottom: 1em;
  }

  code {
    padding: 2px 4px;
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9rem;
    color: $code-text-color;
    background-color: $code-bg-color;
    border-radius: 0.3rem;
  }

  pre {
    padding: 0.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font: 1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;
    color: $code-text-color;
    word-wrap: normal;
    background-color: $code-bg-color;
    border: solid 1px $border-color;
    border-radius: 0.3rem;

    > code {
      padding: 0;
      margin: 0;
      font-size: 0.9rem;
      color: $code-text-color;
      word-break: normal;
      white-space: pre;
      background: transparent;
      border: 0;
    }
  }

  .highlight {
    margin-bottom: 1rem;

    pre {
      margin-bottom: 0;
      word-break: normal;
    }
  }

  .highlight pre,
  pre {
    padding: 0.8rem;
    overflow: auto;
    font-size: 0.9rem;
    line-height: 1.45;
    border-radius: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }

  pre code,
  pre tt {
    display: inline;
    max-width: initial;
    padding: 0;
    margin: 0;
    overflow: initial;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    border: 0;

    &:before,
    &:after {
      content: normal;
    }
  }

  ul,
  ol {
    margin-top: 0;
  }

  blockquote {
    padding: 0 1rem;
    margin-left: 0;
    color: $blockquote-text-color;
    border-left: 0.3rem solid $border-color;

    > :first-child {
      margin-top: 0;
    }

    > :last-child {
      margin-bottom: 0;
    }
  }

  table {
    display: block;
    width: 100%;
    overflow: auto;
    word-break: normal;
    word-break: keep-all; // For Firefox to horizontally scroll wider tables.
    -webkit-overflow-scrolling: touch;

    th {
      font-weight: bold;
    }

    th,
    td {
      padding: 0.5rem 1rem;
      border: 1px solid $table-border-color;
    }
  }

  dl {
    padding: 0;

    dt {
      padding: 0;
      margin-top: 1rem;
      font-size: 1rem;
      font-weight: bold;
    }

    dd {
      padding: 0;
      margin-bottom: 1rem;
    }
  }

  hr {
    height: 2px;
    padding: 0;
    margin: 1rem 0;
    background-color: $hr-border-color;
    border: 0;
  }
}

.site-footer {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: solid 1px $hr-border-color;

  @include large {
    font-size: 1rem;
  }

  @include medium {
    font-size: 1rem;
  }

  @include small {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
}

.site-footer-owner {
  display: block;
  font-weight: bold;
}

.site-footer-credits {
  color: $blockquote-text-color;
}

.site-footer {

  @include large {
  }

  @include medium {
  }

  @include small {
  }

  .my-span-icon {

    a {
    	text-decoration: none;
    }
    a:hover {
      text-decoration: none;
    }

    @include large {
      padding: 0px 5px 0px 5px;
    }

    @include medium {
      //font-size: 1rem;
      padding: 0px 10px 10px 10px;
    }

    @include small {
      padding: 0px 10px 10px 10px;
    }
  }

  .my-svg-icon {

    color: $body-text-color; // IE8
    fill: $body-text-color; // IE8
    width: 24px;
    height: 24px;

    &:hover {
      text-decoration: none;
      color: $section-headings-color; // IE8
      fill: $section-headings-color;
      transform: scale(1.25);
      transition: color .5s, transform .2s ease-out
    }

    @include large {
      width: 28px;
      height: 28px;
    }

    @include medium {
      width: 32px;
      height: 32px;
    }

    @include small {
      width: 36px;
      height: 36px;
    }

  } // social-icons

}
